﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public static class ListExtensions
{
	public static void Shuffle<T>(this List<T> i_List)
	{
		int size = i_List.Count;
		
		for (int i = 0; i < size; i++)
		{
			int indexToSwap = Random.Range(i, size);
			T oldValue = i_List[i];
			i_List[i] = i_List[indexToSwap];
			i_List[indexToSwap] = oldValue;
		}
	}
}
